package com.itheima.user.controller;

import com.itheima.common.vo.ResultVo;
import com.itheima.user.pojo.ApUser;
import com.itheima.user.service.ApUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@Slf4j
public class LoginController {

    @Autowired
    private ApUserService apUserService;
    @PostMapping("/login/login_auth")
    public ResultVo<Map<String,Object>> loginCheck(@RequestBody Map<String,String> map){
        Map<String, Object> objectMap = apUserService.loginCheck(map);
        return ResultVo.ok(objectMap);
    }
}
